home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_HDF.idb / usr / freeware / include / hdf / dfsd.h.z / dfsd.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  5.0 KB  |  137 lines

  1.  
  2. /****************************************************************************
  3.  * NCSA HDF                                                                 *
  4.  * Software Development Group                                               *
  5.  * National Center for Supercomputing Applications                          *
  6.  * University of Illinois at Urbana-Champaign                               *
  7.  * 605 E. Springfield, Champaign IL 61820                                   *
  8.  *                                                                          *
  9.  * For conditions of distribution and use, see the accompanying             *
  10.  * hdf/COPYING file.                                                        *
  11.  *                                                                          *
  12.  ****************************************************************************/
  13.  
  14. /* $Id: dfsd.h,v 1.22 1996/03/28 21:57:10 koziol Exp $ */
  15.  
  16. /*-----------------------------------------------------------------------------
  17.  * File:    dfsd.h
  18.  * Purpose: header file for the Scientific Data set
  19.  * Invokes: dfrig.h
  20.  * Contents:
  21.  *  Structure definitions: DFSsdg
  22.  *  Constant definitions: DFS_MAXLEN
  23.  * Remarks: This is included with user programs which use SDG
  24.  *          Currently defined to be 2-D.  Will later be increased to
  25.  *          multiple dimensions
  26.  *---------------------------------------------------------------------------*/
  27.  
  28. #ifndef _DFSD_H   /* avoid re-inclusion */
  29. #define _DFSD_H
  30.  
  31. #include "hdf.h"
  32.  
  33. /* include numbertype and aid for 3.2   S. Xu   */
  34. /* structure to hold SDG info */
  35. typedef struct DFSsdg
  36.   {
  37.       DFdi        data;         /* tag/ref of data in file */
  38.       intn        rank;         /* number of dimensions */
  39.       int32 *dimsizes;    /* dimensions of data */
  40.       char *coordsys;
  41.       char *dataluf[3];   /* label/unit/format of data */
  42.       char **dimluf[3];   /* label/unit/format for each dim */
  43.       uint8 **dimscales;  /* scales for each dimension */
  44.       uint8       max_min[16];  /* max, min values of data, */
  45.       /*  currently atmost 8 bytes each   */
  46.       int32       numbertype;   /* default is float32      */
  47.       uint8       filenumsubclass;  /* number format in the file, default is IEEE */
  48.       int32       aid;          /* access id     */
  49.       int32       compression;  /* 0 -- not compressed  */
  50.       int32       isndg;        /* 0 -- pure sdg, written by 3.1 else ndg */
  51.       float64     cal, cal_err; /* calibration multiplier stuff          */
  52.       float64     ioff, ioff_err;   /* calibration offset stuff              */
  53.       int32       cal_type;     /* number type of data after calibration */
  54.       uint8       fill_value[DFSD_MAXFILL_LEN];     /* fill value if any specified  */
  55.       intn        fill_fixed;   /* whether ther fill value is a fixed value, or it can change */
  56.   }
  57. DFSsdg;
  58.  
  59. /* DFnsdgle is the internal structure which stores SDG or NDS and   */
  60. /* related SDG in an HDF file.                                      */
  61. /* It is a linked list.                                             */
  62.  
  63. typedef struct DFnsdgle
  64.   {
  65.       DFdi        nsdg;         /* NDG from 3.2 or SDG from 3.1  */
  66.       DFdi        sdg;          /* Only special NDF has values in this field */
  67.       struct DFnsdgle *next;
  68.   }
  69. DFnsdgle;
  70.  
  71. typedef struct DFnsdg_t_hdr
  72.   {
  73.       uint32      size;
  74.       DFnsdgle   *nsdg_t;
  75.   }
  76. DFnsdg_t_hdr;
  77.  
  78. #if defined c_plusplus || defined __cplusplus
  79. extern      "C"
  80. {
  81. #endif                          /* c_plusplus || __cplusplus */
  82.  
  83.     extern int32 DFSDIopen
  84.                 (const char * filename, int acc_mode);
  85.  
  86.     extern int  DFSDIsdginfo
  87.                 (int32 file_id);
  88.  
  89.     extern int  DFSDIclear
  90.                 (DFSsdg * sdg);
  91.  
  92.     extern int  DFSDIclearNT
  93.                 (DFSsdg * sdg);
  94.  
  95.     extern int  DFSDIgetdata
  96.                 (const char * filename, intn rank, int32 maxsizes[], VOIDP data,
  97.                  int isfortran);
  98.  
  99.     extern int  DFSDIputdata
  100.                 (const char * filename, intn rank, int32 * dimsizes, VOIDP data,
  101.                  int accmode, int isfortran);
  102.  
  103.     extern int  DFSDIgetslice
  104.                 (const char * filename, int32 winst[], int32 windims[], VOIDP data,
  105.                  int32 dims[], int isfortran);
  106.  
  107.     extern int  DFSDIputslice
  108.                 (int32 windims[], VOIDP data, int32 dims[], int isfortran);
  109.  
  110.     extern int  DFSDIendslice
  111.                 (int isfortran);
  112.  
  113.     extern intn DFSDIrefresh
  114.                 (char * filename);
  115.  
  116.     extern int  DFSDIisndg
  117.                 (intn * isndg);
  118.  
  119.     extern int  DFSDIgetrrank
  120.                 (intn * rank);
  121.  
  122.     extern int  DFSDIgetwrank
  123.                 (intn * rank);
  124.  
  125.     extern int  DFSDIsetdimstrs
  126.                 (int dim, const char * label, const char * unit, const char * format);
  127.  
  128.     extern int  DFSDIsetdatastrs
  129.                 (const char * label, const char * unit, const char * format,
  130.                  const char * coordsys);
  131.  
  132. #if defined c_plusplus || defined __cplusplus
  133. }
  134. #endif                          /* c_plusplus || __cplusplus */
  135.  
  136. #endif                          /* _DFSD_H */
  137.